/*
 * @Author: 肖芬芳 10547202+xiao-fenfang@user.noreply.gitee.com
 * @Date: 2022-07-19 09:24:45
 * @LastEditors: 肖芬芳 1911683843@qq.com
 * @LastEditTime: 2022-12-13 10:20:09
 * @FilePath: \vue-api-serverc:\Users\Administrator\Desktop\vite-project\src\main.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
// 添加ElementPlus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 设置组件中文样式
import locale from 'element-plus/lib/locale/lang/zh-cn'


// 富文本编辑器
import { Editor, Toolbar } from '@wangeditor/editor-for-vue'
import '@wangeditor/editor/dist/css/style.css' // 引入 css

// 设置全局样式
import '@/assets/style/index.scss'
// 图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 全局变量
import { store, key } from './store'

// 全局组件
import formSearch from '@/components/form/search/Search.vue'
import tableList from '@/components/table/index.vue'
import amForm from '@/components/form/modify/AmForm.vue'
import FileUpload from "@/components/form/upload/FileUpload.vue"

const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(ElementPlus, { locale })
  .use(router)
  .use(store, key)
  .component('formSearch',formSearch)
  .component('tableList',tableList)
  .component('amForm',amForm)
  .component('fileUpload',FileUpload)
  .component('Editor',Editor)
  .component('Toolbar',Toolbar)
  .mount('#app')
